<div class="gird_24 dhead">
    <div class="dcontent dpr">
        <div class="dhotline" >
            Hotline : <b>{{if isset($_SESSION["aSettings"]["web-hot-line"])}}{{$_SESSION["aSettings"]["web-hot-line"]}}{{else}}0163.322.2233 - 0914.310.800{{/if}}</b>
        </div>
        
        <div class="daccount dpr dmw240 dtar">
            <div class="dfr account-info">
                {{if isset($_SESSION["D-USER"])}}
                <div class="duser dpr">
                    <image src="{{$Configs["U"]["Avatar"]}}"/>
                </div>
                <div style="float: left;padding-right: 12px">
                    <a href="{{base_url("customer/information")}}" style="padding: 0 12px">{{$Configs["U"]["CustomerName"]}}</a>
                    | 
                    <a href="{{base_url('deal/logout')}}" style="padding: 0 12px">Thoát</a>
                </div>
                {{else}}
                <div class="dusernone dpr">
                </div>
                <div style="float: left;padding-right: 12px">
                    <a href="javascript:void(0);" onclick="ShowLogin();" style="padding: 0 12px">Đăng Nhập</a>
                    | 
                    <a href="javascript:void(0);" onclick="ShowRegister();"href="" style="padding: 0 12px">Đăng Ký</a>
                </div>
                {{/if}}
            </div>
            
                    
        </div>
            
        </div>
        <div class="dregion dpr" >
            <a href="javascript:KNotice();" style="" class="dlocation">
            {{$_SESSION["DRegionName"]}}
            </a>
            <div class="dpa locabox" style="-moz-box-shadow: 0 4px 10px #666;
-webkit-box-shadow: 0 4px 10px #666;
box-shadow: 0 4px 10px #666;
-ms-filter: 'progid:DXImageTransform.Microsoft.Shadow(Color=#cccccc, direction=270, strength=7)';
filter: progid:DXImageTransform.Microsoft.Shadow(Color=#cccccc, direction=270, strength=7);">
                <ul>
                    <li class="{{if $_SESSION["DRegion"]==""}}active{{/if}}">
                        <a href="{{base_url("deal/swithlocation")}}">Toàn Quốc</a>
                    </li>
                    {{if isset($_SESSION["regions"])}}
                    {{foreach $_SESSION["regions"] as $r}}
                    <li class="{{if $_SESSION["DRegion"]==$r["id"]}}active{{/if}}">
                        <a href="{{base_url()}}deal/swithlocation/{{$r["id"]}}">{{$r["name"]}}</a>
                    </li>
                    {{/foreach}}
                    {{/if}}
                </ul>
            </div>
        </div>
        
    </div>  
        
</div>
<div class="jfk-bubble jfk-bubble-promo gray registerfrm hidden" 
        style="visibility: visible; left: 50%;margin-left: 140px; top: 60px; opacity: 1;
        padding: 16px;
        ">
    <div class="jfk-bubble-closebtn notice btn" onclick="CloseRegiser();"></div>
    <div class="jfk-bubble-content-id">
        <div class="promo-content" style="width: 320px; ">
            <form action="{{base_url("sys/excution/nothing")}}" 
                name="frmRegister"
                target="integration_asynchronous"
                onsubmit="Register()"
                method="post">
            <h1 style="height: 28px;line-height: 28px;padding: 0;margin: 0;">Đăng ký</h1>
            <div class="_input-label pb4" labelcolor="green">
                <div class="input">
                    <input type="text" id="id-register-email" placeholder="" class="ftooltip" 
                           title="Nhập E-mail của bạn." value="">
                    <div class="label">
                        <label>Email</label>

                    </div>
                </div>
            </div>
            <div class="_input-label pb4" labelcolor="green">
                <div class="input">
                    <input type="password" id="id-register-password" placeholder="" class="ftooltip" 
                           title="Nhập mật khẩu của bạn." value="">
                    <div class="label">
                        <label>Mật Khẩu</label>

                    </div>
                </div>
            </div>
            <div class="_input-label pb4" labelcolor="red">
                <div class="input">
                    <input type="text" id="id-register-name" placeholder="" class="ftooltip" 
                           title="Nhập Họ và Tên của bạn. Họ và Tên chỉ chấp nhận ký tự [a-z],[0-9]" value="">
                    <div class="label">
                        <label>Họ và Tên</label>

                    </div>
                </div>
            </div>
            <div class="_input-label pb4" labelcolor="red">
                <div class="input">
                    <div style="position: absolute;
top: 0;
left: 0;
right: 0;
padding: 0;
margin: 0;
padding-left: 108px;
width: 100%;
border: 1px solid #CCC;
height: 26px;
line-height: 26px;
background: #FAFAFA;
behavior: url(../lib/PIE/PIE.htc);">
                        <div style="width: 26px;height: 26px;float: left">
                            <input style="padding: 0;margin: 0;height: 26px;width: 26px;" 
                                   value="Nam" name="id-register-sex" id="id-register-sex-m" type="radio" />
                        </div>
                        <span class="dfl">Nam</span>
                        <div style="width: 26px;height: 26px;float: left;margin-left: 20px">
                            <input style="padding: 0;margin: 0;height: 26px;width: 26px;" 
                                   value="Nữ" name="id-register-sex" id="id-register-sex-f" type="radio"/>
                        </div>
                        <span>Nữ</span>
                    </div>
                    <div class="label">
                        <label>Giới Tính</label>

                    </div>
                </div>
            </div>
            <div class="_input-label pb4" labelcolor="blue">
                <div class="input">
                    <input type="text" id="id-register-address" placeholder="" class="ftooltip" 
                           title="Nhập dịa chỉ của bạn." value="">
                    <div class="label">
                        <label>Địa Chỉ</label>

                    </div>
                </div>
            </div>
            <div class="_input-label pb4" labelcolor="blue">
                <div class="input">
                    <input type="text" id="id-register-phone" placeholder="" class="ftooltip" 
                           title="Nhập số điện thoại của bạn." value="">
                    <div class="label">
                        <label>Điện thoại</label>

                    </div>
                </div>
            </div>
            <div class="_input-label pb4" labelcolor="blue">
                <div class="input">
                    <input type="text" id="id-register-birth" placeholder="" class="ftooltip" 
                           title="Nhập ngày sinh của bạn." value="">
                    <div class="label">
                        <label>Ngày Sinh</label>

                    </div>
                </div>
            </div>
            <div class="pb4" style="height: 26px">
                <div style="width: 26px;height: 26px;float: left">
                    <input style="padding: 0;margin: 0;height: 26px;width: 26px;" id="id-register-confirm" type="checkbox"/>
                </div>
                <span class="dfl" style="height: 26px;line-height: 26px"><b>Đồng ý với các <a style="color: #28AAD2" href="">điều khoản</a> của chúng tôi.</b></span>
                
            </div>
            <input type="submit" style="width: 0;height: 0;margin: 0;padding: 0;border: 0"/>
            </form>
            <div>
                <div class="mybutton" onclick="Register();">
                    <div><span>Đăng ký</span></div>
                </div>

                <div class="mybutton fr disable green-tooltip"
                    title="Bạn đã có tài khoản?" onclick="ShowLogin();">
                    <div><span>Đăng Nhập</span></div>
                </div>
                <div class="mybutton fr green-tooltip" 
                    title="Đăng nhập với tài khoản Yahoo!" 
                    onclick="newPopup('{{base_url('openid/yahoo')}}');">
                    <div style="padding: 0px;width: 22px;height: 22px">
                        <img width="22" height="22" src="{{base_url()}}deal_css/images/yahoov.png"/>
                    </div>
                </div>
                <div class="mybutton fr green-tooltip" 
                    title="Đăng nhập với tài khoản Google."
                    onclick="newPopup('{{base_url('openid/google')}}');">
                    <div style="padding: 0px;width: 22px;height: 22px">
                        <img width="22" height="22" src="{{base_url()}}deal_css/images/googlev.png"/>
                    </div>
                </div>
                <div class="mybutton fr green-tooltip" 
                    title="Đăng nhập với tài khoản Facebook."
                    onclick="newPopup('{{base_url('openid/face')}}');">
                    <div style="padding: 0px;width: 22px;height: 22px">
                        <img width="22" height="22" src="{{base_url()}}deal_css/images/facebookv.png"/>
                    </div>
                </div>
                    <div class="clear"></div>
            </div>
            <div style="color: red;font-family: tahoma;font-size: 11px" id="registererr"></div>
        </div>
    </div>
    <div class="jfk-bubble-arrow-id jfk-bubble-arrow jfk-bubble-arrowup" style="right: 54px">
        <div class="jfk-bubble-arrowimplbefore" ></div>
        <div class="jfk-bubble-arrowimplafter" ></div>
    </div>
</div>

<div class="jfk-bubble jfk-bubble-promo gray loginfrm hidden" 
        style="visibility: visible; left: 50%;margin-left: 140px; top: 60px; opacity: 1;
        padding: 16px;
        ">
    <div class="jfk-bubble-closebtn notice btn" onclick="CloseLogin();"></div>
    <div class="jfk-bubble-content-id">
        <div class="promo-content" style="width: 320px; ">
            <form action="{{base_url("sys/excution/nothing")}}" 
                name="frmLogin"
                target="integration_asynchronous"
                onsubmit="Login()"
                method="post">
                <input type="submit" style="width: 0;height: 0;margin: 0;padding: 0;border: 0"/>
            <h1 style="height: 28px;line-height: 28px;padding: 0;margin: 0;">Đăng nhập</h1>
            <div class="_input-label pb4" labelcolor="green">
                <div class="input">
                    <input type="text" id="id-login-email" placeholder="" class="ftooltip" 
                           title="Nhập E-mail của bạn." value="">
                    <div class="label">
                        <label>Email</label>

                    </div>
                </div>
            </div>
            <div class="_input-label pb4" labelcolor="green">
                <div class="input">
                    <input type="password" id="id-login-password" placeholder="" class="ftooltip" 
                           title="Nhập mật khẩu của bạn." value="">
                    <div class="label">
                        <label>Mật Khẩu</label>

                    </div>
                </div>
            </div>
            </form>
            <div>
            <div class="mybutton disable green-tooltip" 
                 title="Bạn chưa  có tài khoản?"
                 onclick="ShowRegister();">
                <div><span>Đăng ký</span></div>
            </div>
            <div class="mybutton fr " onclick="Login();">
                <div><span>Đăng Nhập</span></div>
            </div>
            <div class="mybutton fr green-tooltip" 
                 title="Đăng nhập với tài khoản Yahoo!" 
                 onclick="newPopup('{{base_url('openid/yahoo')}}');">
                <div style="padding: 0px;width: 22px;height: 22px">
                    <img width="22" height="22" src="{{base_url()}}deal_css/images/yahoov.png"/>
                </div>
            </div>
            <div class="mybutton fr green-tooltip" 
                 title="Đăng nhập với tài khoản Google."
                 onclick="newPopup('{{base_url('openid/google')}}');">
                <div style="padding: 0px;width: 22px;height: 22px">
                    <img width="22" height="22" src="{{base_url()}}deal_css/images/googlev.png"/>
                </div>
            </div>
            <div class="mybutton fr green-tooltip" 
                 title="Đăng nhập với tài khoản Facebook."
                 onclick="newPopup('{{base_url('openid/face')}}');">
                <div style="padding: 0px;width: 22px;height: 22px">
                    <img width="22" height="22" src="{{base_url()}}deal_css/images/facebookv.png"/>
                </div>
            </div>
                <div class="clear"></div>
            </div>
                <div style="color: red;font-family: tahoma;font-size: 11px" id="loginerr"></div>
        </div>
    </div>
    <div class="jfk-bubble-arrow-id jfk-bubble-arrow jfk-bubble-arrowup" style="right: 140px">
        <div class="jfk-bubble-arrowimplbefore" ></div>
        <div class="jfk-bubble-arrowimplafter" ></div>
    </div>
</div>


<div class="gird_24 dsecondhead">
    <div class="dcontent">
        <a href="{{base_url()}}">
        <div class="logo">
            
        </div>
        </a>
        <div style="width: 332px;float: right;height: 118px">
            <div style="padding-top: 24px;position: relative">
                <div class="dsendnotice">
                    Nhận thông báo Deal hấp dẫn mỗi ngày !
                    <div class="darrow"></div>
                </div>
<!--                <div class="demailinput">
                    Nhập Email của bạn
                </div>-->
                <input type="text" id="add_mail_to_send" class="demailinput" placeholder="Nhập Email của bạn"/>
                <div class="demailbtn" 
                     onclick="add_mail();">
                </div>
            </div>
        </div>
    </div> 
</div>
<div class="jfk-bubble jfk-bubble-promo msg  noticefrm hidden" 
        style="visibility: visible; left: 50%;margin-left: -154px; top: 60px; opacity: 1;
        padding: 16px;
        ">
    <div class="jfk-bubble-closebtn  btn" onclick="CloseNotice();"></div>
    <div class="jfk-bubble-content-id">
        <div class="promo-content notice" style="width: 240px; ">
            Thông báo
        </div>
    </div>
    <div class="jfk-bubble-arrow-id jfk-bubble-arrow jfk-bubble-arrowright" style="bottom: 50%">
        <div class="jfk-bubble-arrowimplbefore" ></div>
        <div class="jfk-bubble-arrowimplafter" ></div>
    </div>
</div>
<div class="jfk-bubble jfk-bubble-promo msg  openidnoticefrm hidden" 
        style="visibility: visible; left: 50%;margin-left: 200px; top: 110px; opacity: 1;
        padding: 16px;
        ">
    <div class="jfk-bubble-closebtn  btn" onclick="CloseOpenIDNotice();"></div>
    <div class="jfk-bubble-content-id">
        <div class="promo-content openidnotice" style="width: 240px; ">
            Thông báo
        </div>
    </div>
    <div class="jfk-bubble-arrow-id jfk-bubble-arrow jfk-bubble-arrowdown" style="left: 50%">
        <div class="jfk-bubble-arrowimplbefore" ></div>
        <div class="jfk-bubble-arrowimplafter" ></div>
    </div>
</div>
<div class="jfk-bubble jfk-bubble-promo NoticeMsgFrm hidden " 
        style="visibility: visible; left: 50%;margin-left: -240px; top: 40%; opacity: 1;position: fixed;
        padding: 16px;
        ">
    <div class="jfk-bubble-closebtn  btn" onclick="$('.NoticeMsgFrm').hide();"></div>
    <div class="jfk-bubble-content-id">
        <div class="promo-content NoticeMsg" style="width: 480px; ">
            Thông báo
        </div>
    </div>
    <div class="jfk-bubble-arrow-id jfk-bubble-arrow jfk-bubble-arrowup hidden" style="left: 50%">
        <div class="jfk-bubble-arrowimplbefore" ></div>
        <div class="jfk-bubble-arrowimplafter" ></div>
    </div>
</div>
<script>
    window.onbeforeunload = function() {
        //return "You're leaving the site.";
    };
    // Popup window code
    
    function add_mail(){
        if(isrunning)return;
        var Mail=$("#add_mail_to_send").val();
        if(!_FcheckEmail(Mail)){ tipMessage("Email Không đúng định dạng.");return; }
        isrunning=true;
        var url=base_url+"Excution/AddMail";
        var data={
            Mail            :   Mail
        };
        jqxAjax(url,data,function(result){
            isrunning=false;
            if(result.code>=1){
                tipMessage(result.msg);
            }else{
                tipMessage(result.msg);
            }
            
        });
        
    }
    
    function newPopup(url) {
        var top = (screen.height - 400) / 2;
        var left = (screen.width - 580) / 2;
        popupWindow = window.open(
                url,'popUpWindow',
                'height=400,width=580,top='+top+',left='+left+',resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes');
    }
</script>
